# 日期对象
class DateClass:
    # 初始化对象
    def __init__(self, date, week=False, holiday=False, adjustment=False, gregorian="", lunar=""):
        # 日期
        self.date = date
        # 现代节日
        self.gregorian = gregorian
        # 农历节日
        self.lunar = lunar
        # 是否周末
        self.week = bool(week)
        # 是否节假日
        self.holiday = bool(holiday)
        # 是否调休
        self.adjustment = bool(adjustment)

    # 序列化对象
    def to_dict(self):
        return {
            "date": str(self.date),
            "week": self.week,
            "holiday": self.holiday,
            "adjustment": self.adjustment,
            "gregorian": self.gregorian,
            "lunar": self.lunar
        }
